#ifndef CLEANUP_H
#define CLEANUP_H

#include <QThread>
#include <QDir>
#include <QObject>

#include "api.h"
#include "mysettings.h"

class cleanup: public QThread
{
    Q_OBJECT

public:
    cleanup(QObject * parent = 0);

    void setRunMode( int mode, QStringList pathList );
    QList<cleanDataStruct*> getCleanupList();

signals:
    void makeStep( double );

protected:
    void run();

private:
    uint totalItemsCount;
    QList<cleanDataStruct*> cleanupList;
    int run_mode;
    QFileInfoList _fileList;

    int  getCleanupListIndex( QString );
    void calculate( const QString& );
    void clearVariables();
    void removeFiles();
};

#endif // CLEANUP_H
